package ${package.Mapper};

import ${package.Entity}.${entity};
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ${table.comment!} Mapper 接口
 *
 * @author ${author}
 * @since ${date}
 */
<#--获取主键字段-->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign primaryKey = field>
    </#if>
</#list>

public interface ${table.mapperName} {
    List<${entity}> getPaged${cfg.entityName}List(@Param("${cfg.searchField}") String ${cfg.searchField});

    ${entity} get${cfg.entityName}ById(@Param("${primaryKey.name}") ${primaryKey.propertyType} ${primaryKey.propertyName});

    int add${cfg.entityName}(${entity} record);

    int edit${cfg.entityName}(${entity} record);

    int delete${cfg.entityName}ByIds(List<${primaryKey.propertyType}> idList);

}
